icontheme: Stop exporting gtk_icon_info_new_for_file
authorTimm Bäder <mail@baedert.org>
Tue, 30 Oct 2018 15:31:09 +0000 (16:31 +0100)
committerTimm Bäder <mail@baedert.org>
Thu, 8 Nov 2018 04:48:14 +0000 (05:48 +0100)
gtk/gtkicontheme.c
gtk/gtkiconthemeprivate.h

index 1696995cc4e28a97ffec8d358bde7b8a4f09a044..e728b0bdb7a417e213867d2fcc3b342dc39653b1 100644 (file)
@@ -4710,6 +4710,39 @@ gtk_icon_theme_lookup_by_gicon (GtkIconTheme       *icon_theme,
                                                    size, 1, flags);
 }
 
+static GtkIconInfo *
+gtk_icon_info_new_for_file (GFile *file,
+                            gint   size,
+                            gint   scale)
+{
+  GtkIconInfo *info;
+
+  info = icon_info_new (ICON_THEME_DIR_UNTHEMED, size, 1);
+  info->loadable = G_LOADABLE_ICON (g_file_icon_new (file));
+  info->icon_file = g_object_ref (file);
+  info->is_resource = g_file_has_uri_scheme (file, "resource");
+
+  if (info->is_resource)
+    {
+      gchar *uri;
+
+      uri = g_file_get_uri (file);
+      info->filename = g_strdup (uri + 11); /* resource:// */
+      g_free (uri);
+    }
+  else
+    {
+      info->filename = g_file_get_path (file);
+    }
+
+  info->is_svg = suffix_from_name (info->filename) == ICON_SUFFIX_SVG;
+
+ info->desired_size = size;
+ info->desired_scale = scale;
+ info->forced_size = FALSE;
+
+ return info;
+}
 
 /**
  * gtk_icon_theme_lookup_by_gicon_for_scale:
@@ -4830,37 +4863,3 @@ gtk_icon_info_new_for_pixbuf (GtkIconTheme *icon_theme,
 
   return info;
 }
-
-GtkIconInfo *
-gtk_icon_info_new_for_file (GFile *file,
-                            gint   size,
-                            gint   scale)
-{
-  GtkIconInfo *info;
-
-  info = icon_info_new (ICON_THEME_DIR_UNTHEMED, size, 1);
-  info->loadable = G_LOADABLE_ICON (g_file_icon_new (file));
-  info->icon_file = g_object_ref (file);
-  info->is_resource = g_file_has_uri_scheme (file, "resource");
-
-  if (info->is_resource)
-    {
-      gchar *uri;
-
-      uri = g_file_get_uri (file);
-      info->filename = g_strdup (uri + 11); /* resource:// */
-      g_free (uri);
-    }
-  else
-    {
-      info->filename = g_file_get_path (file);
-    }
-
-  info->is_svg = suffix_from_name (info->filename) == ICON_SUFFIX_SVG;
-
- info->desired_size = size;
- info->desired_scale = scale;
- info->forced_size = FALSE;
-
- return info;
-}
index ca9d5177b0c78aa0020814530d7e10d14979129d..132d5154ee541b319638574de2d1c16ebd2ceb01 100644 (file)
@@ -27,8 +27,4 @@ void        gtk_icon_theme_lookup_symbolic_colors       (GtkCssStyle    *style,
                                                          GdkRGBA        *warning_out,
                                                          GdkRGBA        *error_out);
 
-GtkIconInfo *gtk_icon_info_new_for_file (GFile *file,
-                                         gint   size,
-                                         gint   scale);
-
 #endif /* __GTK_ICON_THEME_PRIVATE_H__ */